/////////////////////////////////////////////////////////////////////////////////////////////////////////
// Article: "When Disasters Hit Civil Wars: Natural Resource Exploitation and Rebel Group Resilience"  //
// Journal: International Studies Quarterly                                                            //
// Author: Yasutaka Tominaga and Chia-yi Lee                                                           //
// Email: y-tominaga@yasutakatominaga.com                                                              //
// Last updated: December 18, 2020                                                                     //
// Version: Stata 16                                                                                   //
/////////////////////////////////////////////////////////////////////////////////////////////////////////

**Data source for natural resource and armed conflicts**
// Conrad, Justin M., Walsh, James Igoe, and Whitaker, Beth Elise. (2017). "Rebel Contraband Dataset Version 1.0" (http://www.civilwardynamics.org)
// Cunningham, David E, Kristian Skrede Gleditsch and Idean Salehyan. (2013). "Non-state Actors in Civil Wars: A New Dataset." Conflict Management and Peace Science 30(5):516–531.
// EM-DAT: The Emergency Events Database - Université catholique de Louvain (UCL) - CRED, D. Guha-Sapir - www.emdat.be, Brussels, Belgium

****************************************SET*****************************************
set more off
use "`c(pwd)'/ReplicationDataset.dta", clear 
log using replication,replace
graph set window fontface "Times New Roman"
set matsize 800

******************************Key Variable lists************************************

//DisIntense: lagged disaster intensity (logged) based on the EM-DAT (The international disasters database)
//natural_resource: natural resource (binary) based on Conrad et al. (2017)
//natural_resource_cate: natural resources (categorical variable)
//end_type1: a binary indicator that has a value of 1 when a conflict ends with a rebel victory or a peace settlement, or when a conflict does not end, and 0 when a conflict temporarily suspends due to ceasefire or a state victory, or when a conflict vanishes
//end_type2: a categorical variable (1=STATE VICTORY, 2=NO ACTIVITY OR LOW ACTICITY, 3=CEASE-FIRE & PEACE AGREEMENT, and 4=NOT TERMINATED or REBEL VICTORY)
//end_type3: a binary indicator (1 if victory or Not terminated and 0 if others)
//ma_3yrs: three-year moving averages of frequency of disasters
//terr_cont: This is a binary indicator indicating whether the rebel group controls territory extracted from Cunningham et al. (2012)
//lngdp_cons: GDP (logged)
//ln_pop: Population (logged)
//ln_milper_raw: military personnel (logged)
//x_polity: X Polity based on Vreeland (2008)
//lnaid_cons: the annual amount of total aid to all sectors received by a country (in constant 2015 U.S. dollars, logged)
//group_age: Conflict duration
//region: regional categories (Middle East, Asia, Africa, Americas, and Europe)
//sample1: samples for the model 1 and model 3 (N=471 observations)
//sample2: samples for the model 2 and model 4 (the groups only relying on natural resource) (N=270 observations)
//typeoftermination: type of conflict termination based on Cunningham et al. (2013)
//victoryside: victory side based on Cunningham et al. (2013)
//extortion and smuggling data: a binary indicator whether a group extracts resources from those sources based on Conrad et al. (2017) 
************************************************************************************



******************************************************************************
********************************Main Analysis*********************************
******************************************************************************

*************Table 1*************
sum end_type1 DisIntense natural_resource natural_resource_cate lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age terr_cont if sample1==1 
sum end_type1 DisIntense natural_resource natural_resource_cate lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age terr_cont if sample2==1

*************MODEL 1*************
logit end_type1 i.natural_resource##c.DisIntense ma_3yrs i.region if sample1==1, vce(cluster region)
est store r1

************* Model 2*************
//** Restrict the data only with natural resources **//
logit end_type1 i.natural_resource_cate##c.DisIntense ma_3yrs i.region if sample2==1, vce(cluster region)
est store r2

*************Model 3*************
/*include all control variables */ 
logit end_type1 i.natural_resource##c.DisIntense ma_3yrs terr_cont lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample1==1, vce(cluster region)
est store r3

*************Figure 1(a): Marginal Effects*************
margins, dydx(natural_resource) at(DisIntense=(0(0.1)19))
marginsplot, graphregion(color(white)) plotopts(msize(tiny) msymbol(diamond)  mcolor(gray)) ciopts(lcolor(gs14) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=1,range(9.903538 14.56007) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-0.5)) ytitle({stSerif:Marginal Effects of Natural Resource on Pr(y{subscript:i}=1)}) xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("") legend(off) note("{stSerif:Coefficient on product term is -0.225 (Standard Error=0.06; t-ratio=-3.63)}" "{stSerif:Spikes represent 95% confidence intervals}" "{stSerif:Dashed line area represents the values between 25% and 75% of the histogram.}", size(small))

*************Model 4*************
logit end_type1 i.natural_resource_cate##c.DisIntense ma_3yrs terr_cont lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample2==1, vce(cluster region)
est store r4

*************Figure 1(b): Marginal Effects*************
margins, dydx(natural_resource_cate) at(DisIntense=(0(0.1)19))
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=1,range(9.934793 15.98535) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-1)) ytitle({stSerif:Marginal Effects of Extorting Resources on Pr(y{subscript:i}=1)}) xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("") legend(off) note("{stSerif:1. Smuggling (base category)}" "{stSerif:2. Extortion (solid line): Coefficient on product term is -1.082 (Standard Error=0.27; t-ratio=-3.93)}" "{stSerif:3. Extortion and Smuggling (dashed line): Coefficient on product term is -0.478 (Standard Error=0.14;)}" "{stSerif:t-ratio=-3.33 Spikes represent 95% confidence intervals}" "{stSerif:Dashed line area represents the values between 25% and 75% of the histogram.}", size(small))

*************TABLE 2*************
esttab *, se b(3) ar2 aic star(* 0.1 ** 0.05 *** 0.01) nodepvar



******************************************************************************
*******************************ROBUSTNESS CHECK*******************************
******************************************************************************

*************Table A1*************
tab end_type2 if sample1==1
tab end_type2 if sample2==1
				
**************MODEL 1 (Appendix: Table A2)*************
ologit end_type2 i.natural_resource##c.DisIntense ma_3yrs i.region if sample1==1, vce(cluster region)
est store ro1

**************MODEL 2 (Appendix: Table A2)**************
ologit end_type2 i.natural_resource_cate##c.DisIntense ma_3yrs i.region if sample2==1, vce(cluster region)
est store ro2		

**************MODEL 3**************
ologit end_type2 i.natural_resource##c.DisIntense ma_3yrs terr_cont lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample1==1, vce(cluster region)
est store ro3

**************Figure A1(a)**************
margins, dydx(natural_resource) at(DisIntense=(0(0.2)19)) predict(outcome(1)) level(90)
marginsplot, graphregion(color(white)) plotopts(msize(tiny) msymbol(diamond)  mcolor(gray)) ciopts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs12) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=0.2,range(9.903538 14.56007) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-0.05)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("1.State Victory", size(medium)) legend(off) saving(outcome1_re, replace)

margins, dydx(natural_resource) at(DisIntense=(0(0.2)19)) predict(outcome(2)) level(90)
marginsplot, graphregion(color(white)) plotopts(msize(tiny) msymbol(diamond)  mcolor(gray)) ciopts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs12) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=0.4,range(9.903538 14.56007) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-0.4)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("2.NO ACTIVITY OR LOW ACTICITY", size(medium)) legend(off) saving(outcome2_re, replace)

margins, dydx(natural_resource) at(DisIntense=(0(0.2)19)) predict(outcome(3)) level(90)
marginsplot, graphregion(color(white)) plotopts(msize(tiny) msymbol(diamond)  mcolor(gray)) ciopts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs12) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=0.1,range(9.903538 14.56007) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-0.15)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("3.CEASE-FIRE & PEACE AGREEMENT", size(medium)) legend(off) saving(outcome3_re, replace)

margins, dydx(natural_resource) at(DisIntense=(0(0.2)19)) predict(outcome(4)) level(90)
marginsplot, graphregion(color(white)) plotopts(msize(tiny) msymbol(diamond)  mcolor(gray)) ciopts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs12) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=0.6,range(9.903538 14.56007) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-0.3)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("4.REBEL VICTORY & CONTINUATION", size(medium)) legend(off) saving(outcome4_re, replace)

gr combine outcome1_re.gph outcome2_re.gph outcome3_re.gph outcome4_re.gph, title("") l1title({stSerif:Marginal Effects of Natural Resource on Pr(y{subscript:i}=M)}) graphregion(color(white)) note("{stSerif:Coefficient on product term is -0.117 (Standard Error=0.065; t-ratio=-1.81)}" "{stSerif:Spikes represent 90% confidence intervals.}" "{stSerif:Dashed line area represents the values between 25% and 75% of the histogram.}" "{stSerif:M=1: State victory, 2: No or low activity, 3: Ceasefire or peace settlement, 4: Continuation or rebel victory}",size(small)) 

**************MODEL 4**************
ologit end_type2 i.natural_resource_cate##c.DisIntense ma_3yrs terr_cont lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample2==1, vce(cluster region)
est store ro4

**************Figure A1(b)**************
margins, dydx(natural_resource_cate) at(DisIntense=(0(0.2)19)) predict(outcome(1)) level(90)
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=2,range(9.934793 15.98535) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-2)) title("1.State Victory", size(medium)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) legend(off) saving(outcome1_ro, replace)

margins, dydx(natural_resource_cate) at(DisIntense=(0(0.2)19)) predict(outcome(2)) level(90)
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=0.8,range(9.934793 15.98535) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-1)) title("2.NO ACTIVITY OR LOW ACTICITY", size(medium)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) legend(off) saving(outcome2_ro, replace)

margins, dydx(natural_resource_cate) at(DisIntense=(0(0.2)19)) predict(outcome(3)) level(90)
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=1,range(9.934793 15.98535) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-1.2)) title("3.CEASE-FIRE & PEACE AGREEMENT", size(medium)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) legend(off) saving(outcome3_ro, replace)

margins, dydx(natural_resource_cate) at(DisIntense=(0(0.2)19)) predict(outcome(4)) level(90)
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=2,range(9.934793 15.98535) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-2)) title("4.REBEL VICTORY & CONTINUATION", size(medium)) ytitle("") xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) legend(off) saving(outcome4_ro, replace)

gr combine outcome1_ro.gph outcome2_ro.gph outcome3_ro.gph outcome4_ro.gph, title("") l1title({stSerif:Marginal Effects of Extorting Resources on Pr(y{subscript:i}=M)}) graphregion(color(white)) note("{stSerif:1. Smuggling (base category)}" "{stSerif:2. Extortion (solid line): Coefficient on product term is -0.453 (Standard Error=0.170; t-ratio=-2.66)}" "{stSerif:3. Extortion and Smuggling (dashed line): Coefficient on product term is -0.407 (Standard Error=0.222;)}" "{stSerif:t-ratio=-1.83 Spikes represent 90% confidence intervals}" "{stSerif:Dashed line area represents the values between 25% and 75% of the histogram.}" "{stSerif:M=1: State victory, 2: No or low activity, 3: Ceasefire or peace settlement, 4: Continuation or rebel victory}", size(small)) 


*************Table A2*************
esttab ro1 ro2 ro3 ro4, se b(3) ar2 aic star(* 0.1 ** 0.05 *** 0.01) nodepvar

*************Model 1(Appendix: Table A3)*************
logit end_type3 i.natural_resource##c.DisIntense ma_3yrs i.region if sample1==1, vce(cluster region)
est store r1_a

*************Model 2(Appendix: Table A3)*************
logit end_type3 i.natural_resource_cate##c.DisIntense ma_3yrs i.region if sample2==1, vce(cluster region)
est store r2_a

*************Model 3(Appendix: Table A3)*************
logit end_type3 i.natural_resource##c.DisIntense ma_3yrs terr_cont lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample1==1, vce(cluster region)
est store r3_a

*************Figure A2(a) Marginal Effects*************
margins, dydx(natural_resource) at(DisIntense=(0(0.1)19))
marginsplot, graphregion(color(white)) plotopts(msize(tiny) msymbol(diamond)  mcolor(gray)) ciopts(lcolor(gs14) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=1,range(9.903538 14.56007) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-0.5)) ytitle({stSerif:Marginal Effects of Natural Resource on Pr(y{subscript:i}=1)}) xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("") legend(off) note("{stSerif:Coefficient on product term is -0.177 (Standard Error=0.09; t-ratio=-2.01).}" "{stSerif:Spikes represent 95% confidence intervals.}" "{stSerif:Dashed line area represents the values between 25% and 75% of the histogram.}", size(small))

*************Model 4(Appendix: Table A3)*************
logit end_type3 i.natural_resource_cate##c.DisIntense ma_3yrs terr_cont lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample2==1, vce(cluster region)
est store r4_a

*************Figure A2(b) Marginal Effects*************
margins, dydx(natural_resource_cate) at(DisIntense=(0(0.1)19))
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) addplot(hist DisIntense, percent legend(off) fcolor(none) lcolor(gs8) lwidth(thin) yaxis(2) yscale(alt axis(2)) ytitle({stSerif:Percentage of Observations}, axis(2)) || function y=1.5,range(9.934793 15.98535) recast(area) color(none) lcolor(black) lpattern(shortdash) base(-1)) ytitle({stSerif:Marginal Effects of Extorting Resources on Pr(y{subscript:i}=1)}) xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("") legend(off) note("{stSerif:1. Smuggling (base category).}" "{stSerif:2. Extortion (solid line): Coefficient on product term is -0.775 (Standard Error=0.30; t-ratio=-2.60).}" "{stSerif:3. Extortion and Smuggling (dashed line): Coefficient on product term is -0.584 (Standard Error=0.13;}" "{stSerif:t-ratio=-4.47 Spikes represent 95% confidence intervals.}" "{stSerif:Dashed line area represents the values between 25% and 75% of the histogram.}", size(small))

*************Table A3*************
esttab r1_a r2_a r3_a r4_a, se b(3) ar2 aic star(* 0.1 ** 0.05 *** 0.01) nodepvar


*************Figure A3*************
*************Including three-way interaction terms*************
logit end_type1 i.terr_cont##i.natural_resource##c.DisIntense ma_3yrs lngdp_cons ln_pop ln_milper_raw x_polity lnaid_cons group_age i.region if sample1==1, vce(cluster region)

margins, dydx(natural_resource) at(DisIntense=(0(0.2)19) terr_cont=(0 1)) level(90)
marginsplot, recast(line) plot1opts(lpattern(solid)) plot2opts(lpattern("--")) graphregion(color(white)) ci1opts(lcolor(gs14) msize(vtiny)) ci2opts(lcolor(gs8) msize(vtiny)) yline(0, lwidth(medthick) lpattern(dash)) ytitle({stSerif:Marginal Effects of Natural Resource on Pr(y{subscript:i}=1)}) xtitle({stSerif:log(Natural Disaster{subscript:t-1})}) title("") legend(off) note("{stSerif:Coefficient on three way product term is -0.836 (Standard Error=0.303; t-ratio=-2.75)}" "{stSerif:Spikes represent 90% confidence intervals}" "{stSerif:Dashed line represents a rebel group with controlling territory}" "{stSerif:Solid line represents a rebel group without controlling territory}", size(small))


*************Figure A4*************
*************Pie Chart for the distribution of Extrotion Categories*************
lab var coca_extortion "Coca"
lab var tea_extortion "Tea"
lab var oil_extortion "Oil"
lab var gold_extortion "Gold"
lab var timber_extortion "Timber"
lab var cannabis_extortion "Cannabis"
lab var opium_extortion "Opium"
lab var animal_extortion "Animal"
lab var coffee_extortion "Coffee"
lab var agriculture_extortion "Agriculture"

graph pie oil_extortion tea_extortion coca_extortion gold_extortion timber_extortion cannabis_extortion opium_extortion animal_extortion coffee_extortion agriculture_extortion if sample2==1, sort descending plabel(1 name, size(medlarge) gap(-4) color(white)) plabel(2 name, gap(-9) size(medlarge) color(white)) plabel(3 name, size(medlarge) gap(-4) color(white)) plabel(4 name, size(medlarge) gap(-4) color(white)) plabel(5 name, size(medlarge) gap(-4) color(white)) plabel(6 name, size(medlarge) gap(3) color(black)) plabel(7 name, size(medlarge) gap(-1) color(white)) plabel(8 name, size(medlarge) gap(-3) color(white)) plabel(9 name, size(medlarge) gap(-2) color(white)) plabel(10 name, size(medlarge) gap(3) color(white)) plabel(1 "13.6%", size(medsmall) gap(3) color(white)) plabel(2 "11.9%", size(medsmall) gap(1) color(white)) plabel(3 "10.7%", size(medsmall) gap(3) color(white)) plabel(4 "9.5%", size(medsmall) gap(3) color(white))plabel(5 "9.0%", size(medsmall) gap(7) color(white)) plabel(6 "7.6%", size(medsmall) gap(21) color(black)) plabel(7 "5.3%", size(medsmall) gap(22) color(black)) plabel(8 "5.1%", size(medsmall) gap(22) color(black)) plabel(9 "4.3%", size(medsmall) gap(21) color(black)) plabel(10 "4.3%", size(medsmall) gap(8) color(black)) graphregion(color(white)) scheme(s2mono) legend(off) title("") saving(pie1, replace)

lab var opium_smuggling "Opium"
lab var coca_smuggling "Coca"
lab var cannabis_smuggling "Cannabis"
lab var timber_smuggling "Timber"
lab var drugs_smuggling "Drugs"
lab var gems_smuggling "Gems"
lab var gold_smuggling "Gold"
lab var other_smuggling "Other"
lab var coffee_smuggling "Coffee"
lab var oil_smuggling "Oil"

graph pie opium_smuggling coca_smuggling cannabis_smuggling timber_smuggling drugs_smuggling gems_smuggling gold_smuggling other_smuggling coffee_smuggling oil_smuggling if sample2==1, sort descending plabel(1 name, size(medlarge) gap(-3) color(white)) plabel(2 name, size(medlarge) gap(-3) color(white)) plabel(3 name, size(medlarge) gap(-3) color(white)) plabel(4 name, size(medlarge) gap(0) color(white)) plabel(5 name, size(medlarge) gap(0) color(white)) plabel(6 name, size(medlarge) gap(0) color(black)) plabel(7 name, size(medlarge) gap(0) color(white)) plabel(8 name, size(medlarge) gap(-12) color(white)) plabel(9 name, size(medlarge) color(black) gap(-2)) plabel(10 name, size(medlarge) color(black) gap(10)) plabel(1 "28%", size(medsmall) gap(5) color(white)) plabel(2 "26.5%", size(medsmall) gap(-9) color(white)) plabel(3 "12.3%", size(medsmall) gap(-10) color(white)) plabel(4 "8.7%", size(medsmall) gap(22) color(black)) plabel(5 "6.5%", size(medsmall) gap(22) color(black)) plabel(6 "6.1%", size(medsmall) gap(22) color(black)) plabel(7 "5.4%", size(medsmall) gap(21) color(black)) plabel(8 "4.3", size(medsmall) gap(-18) color(white)) plabel(9 "1.4%", size(medsmall) gap(-7) color(black)) plabel(10 "0.3%", size(medsmall) gap(5) color(black)) graphregion(color(white)) scheme(s2mono) legend(off) title("") saving(pie2, replace)

gr combine pie1.gph pie2.gph, title("") graphregion(color(white)) scheme(s2mono) caption("{stSerif:Notes: The number is the percentage occupied by its category among all categories (not top ten).}" "{stSerif:The second sub-sample data (see Research Design section) is used for the figure.}", size(small))


*************Table A4*************
tab natural_resource_cate terr_cont if sample1==1, row

log close

******************************************************************************
************************************END***************************************
******************************************************************************
